During normal usage of a data storage device, some computer files may be “used” more “frequently” than others. Certain allocatable areas (e.g., tracks or cylinders) of file storage systems may provide faster access rates than do others. For example, the above cited U.S. Pat. No. 5,778,392 of Stockman et al. teaches at col. 20, lines 43–49 that it may be desirable to monitor disk usage patterns, analyze the usage patterns, and then establish a goal state that places at the fastest portion of a disk, those files that are determined to be “most frequently used”. Stockman et al. further teach an opportunistic tile-pulling method that may be used to defragment a disk according to a supplied, goal tile map.
However, it is not clear what criteria should be used to determine whether a given file is indeed being “used” more “frequently” than others. Neither the term, “used” nor the term, “frequently” is well defined. Consider for example, the case of a multitasking computer wherein many files are being “accessed” to one extent or another at substantially the same time by overlapping execution threads. How is it to be determined which of the files are being “most frequently” used and what constitutes a “use” that merits accounting for as opposed to a use that may not be worthwhile counting when measuring frequency of use? How is information about accountable “use” and its frequency to be gathered in a cost efficient manner? And what is to be done with the information once it is collected?
Certain background tasks of a computer system may be running substantially all the time, and may be “using” (reading from and/or writing to) certain, favorite files of theirs on a consistent basis. As a consequence, such background tasks may be consistently consuming a significant amount of the machine's processing bandwidth. A good example is a random access memory (RAM) extending algorithm which uses a so-called “swap file” to expand the apparent storage capacity of the RAM. It does so by moving less-often—used parts of RAM data onto disk while keeping more often used parts in RAM. When the less-often—used RAM data is referenced by a machine operation (e.g., for a data fetch or data write operation), the RAM-extending algorithm swaps that disk-held data into actual RAM while pushing other data out to the swap file to make room. Examples of preemptive types of multitasking operating systems (OS's) that use swap files include Microsoft Windows® all of which are available from Microsoft Corporation of Redmond, Wash.
For the novice end-user of a computer, it usually doesn't matter what specific programs are running in the background, or how “frequently” they run, or what specific files they “use”, so long as foreground operations appear to proceed at an acceptably quick pace on the given computer system (hardware platform). However, because foreground and background tasks often do compete with one another for slices of a finite system bandwidth, the apparent speed of a foreground task may be appreciably enhanced or degraded by tuning the file-utilizing speeds of background tasks.
It may often be beneficial for the end-user (or for an automated agent acting on behalf of such a user) to periodically tune the placement on his or her hard disk (and/or on other such mass-storage devices) of various foreground and background-used files so that more frequently used ones of the files will be located in relatively fast parts of the file storing memory and so that less frequently used ones of the files will be located in comparatively slower parts of the file storing memory. Such periodic tuning may help to improve the speed at which various programs appear to run.
Periodic file re-positioning comes with a price. The processes of: (a) determining which files should be moved; (b) determining where those files should be moved to, and (c) the actual moving of the files may consume so much machine time and/or bandwidth that the end-user may feel the benefit is not worth the pain. It is not unusual to see in the prior art, a “file defragmenting” and/or “file re-positioning” process which takes over full control of the computer and requires a significant amount of time to complete.
In view of the above, practitioners in the art of disk optimization are caught between competing desires. On one hand there is: (a) the desire to minimize tuning time, but on the other hand there is (b) the desire to place files efficiently according to their usage patterns. Practitioners face questions regarding: (1) how to determine which files are “most frequently” used, (2) what constitutes an accountable-for “use”, (3) how can such usage and frequency information be gathered in an efficient manner, and (4) what is to be done with the information once it is collected?
Disclosed herein are methods and systems which may be used to automatically tune or optimize the placement of files in file-storing disks (or in other differential rate memory subsystems) while coping with the above posed difficulties.